<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="/WEB-INF/tag/localeTag.tld" prefix="t"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; UTF-8">
<title>Q & A</title>
<link rel="shortcut icon" href="resources/images/favicon.ico" type="image/x-icon">
<link rel="stylesheet" type="text/css" href="resources/css/bootstrap.css" />
<link rel="stylesheet" type="text/css" href="resources/css/style.css" />
<script type="text/javascript" src="resources/js/jquery-1.11.1.js"></script>
<script type="text/javascript" src="resources/js/bootstrap.js"></script>
<script type="text/javascript" src="resources/js/jquery.validate.min.js"></script>
<script type="text/javascript" src="resources/js/qanda.js"></script>
<!-- <script type="text/javascript" src="resources/js/registrationValid.js"></script>
<script type="text/javascript" src="resources/js/registration.js"></script> -->
</head>
<body>
	<jsp:include page="parts/header.jsp"></jsp:include>
	<jsp:include page="parts/navigation.jsp"></jsp:include>
	<div class="content">
		<jsp:include page="parts/leftmenu.jsp"></jsp:include>
		<div class="page">
			<h1>
				<t:locale mName="registration.title" />
			</h1>
			<form class="form-horizontal" role="form" id="account-data-form" method="POST" action="register">
				<div class="form-group">
					<label for="inputLogin" class="col-sm-2 control-label">
						<t:locale mName="login" />
					</label>
					<div class="col-xs-6">
						<input type="text" class="form-control" id="inputLogin" name="inputLogin" placeholder="<t:locale mName="login"/>">
						<span class="statusLogin"></span>
					</div>
				</div>
				<div class="form-group">
					<label for="inputPassword" class="col-sm-2 control-label">
						<t:locale mName="password" />
					</label>
					<div class="col-xs-6">
						<input type="password" class="form-control" id="inputPassword" name="inputPassword" placeholder="<t:locale mName="password"/>">
					</div>
				</div>
				<div class="form-group">
					<label for="inputConfirmPassword" class="col-sm-2 control-label">
						<t:locale mName="confirmPassword" />
					</label>
					<div class="col-xs-6">
						<input type="password" class="form-control" id="inputConfirmPassword" name="inputConfirmPassword" placeholder="<t:locale mName="confirmPassword"/>">
					</div>
				</div>
				<div class="form-group">
					<label for="inputEmail" class="col-sm-2 control-label">
						<t:locale mName="email" />
					</label>
					<div class="col-xs-6">
						<input type="email" class="form-control" id="inputEmail" name="inputEmail" placeholder="<t:locale mName="email"/>">
						<span class="statusEmail"></span>
					</div>
				</div>
				<div class="form-group">
					<label for="inputFName" class="col-sm-2 control-label">
						<t:locale mName="firstName" />
					</label>
					<div class="col-xs-6">
						<input type="text" class="form-control" id="inputFName" name="inputFName" placeholder="<t:locale mName="firstName"/>">
					</div>
				</div>
				<div class="form-group">
					<label for="inputLName" class="col-sm-2 control-label">
						<t:locale mName="lastName" />
					</label>
					<div class="col-xs-6">
						<input type="text" class="form-control" id="inputLName" name="inputLName" placeholder="<t:locale mName="lastName"/>">
					</div>
				</div>
				<div class="form-group">
					<div class="col-xs-offset-2 col-xs-6">
						<button type="submit" class="btn btn-info">
							<t:locale mName="registration.register" />
						</button>
					</div>
				</div>
			</form>
		</div>
		<c:if test="${not empty result}">
			<div id="registerError">
				<script type="text/javascript">
					$('#parent_popup').show();
				</script>
				<div class="row">
					<div class="col-xs-9">
						<h2>
							<t:locale mName="registration.error" />
						</h2>
					</div>
					<div class="col-xs-3 text-right">
						<span onclick="registerErrorClose();" class="glyphicon glyphicon-remove"></span>
					</div>
					<div class="col-xs-12 text-left">
						<h3>
							<c:if test="${result eq 'exist'}">
								<t:locale mName="registration.warn" />
							</c:if>
							<c:if test="${result eq 'registered'}">
								<t:locale mName="registration.registered" />
							</c:if>
						</h3>
					</div>
				</div>
				<div>
					<button type="button" class="btn btn-info" onclick="registerErrorClose();">
						<t:locale mName="registration.ok" />
					</button>
				</div>
			</div>
		</c:if>
	</div>
	<jsp:include page="parts/footer.jsp"></jsp:include>
</body>
</html>